<template>
  <div id="app">
    <!-- 路由的出口 -->
    <!--
      一级路由的出口, 路由表中所有的顶层路由都是一级路由
      以为router-view是一级路由出口,
      keep-alive只对该级路由有效
     -->
     <keep-alive :include="cachePage">
       <router-view/>
     </keep-alive>
  </div>
</template>

<script>
import { mapState } from 'vuex'
export default {
  name: 'App',
  computed: {
    ...mapState(['cachePage'])
  }
}
</script>
<style lang="less"></style>
